<template>
    <div class="organization-container content-wrapper">
        <el-row :gutter="20">
            <el-col :span="8">
                <el-row class="margin-bottom-10">
                    <el-col>
                        <el-card class="box-card" :body-style="{ padding: '0px' }">
                            <div class="card-header clearfix">
                                <span><i class="el-icon-mars-department margin-right-5" style="color:#324057"></i> 公司</span>
                                <el-button @click="deleteCompany(detailCompany)" icon="delete" style="float: right; padding: 3px 0px 0px 3px" type="text"></el-button>
                                <el-button @click="handleEditCompany(detailCompany)" icon="edit" style="float: right; padding: 3px 10px 0px 3px" type="text"></el-button>
                                <el-button @click="handleAddCompany" icon="plus" style="float: right; padding: 3px 0px 0px 3px" type="text"></el-button>
                            </div>
                            <el-tree :data="dataCompany" node-key="id" ref="treeCompany"
                                     v-loading="loadingCompany"
                                     highlight-current
                                     :check-strictly="true"
                                     :default-expand-all="false"
                                     :default-expanded-keys="expandedKey_company"
                                     :props="defaultProps"
                                     @node-click="handleCompanyNodeClick"
                            ></el-tree>
                        </el-card>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col>
                        <el-card class="box-card" :body-style="{ padding: '0px' }">
                            <div class="card-header clearfix">
                                <span><i class="el-icon-mars-dept margin-right-5" style="color:#324057"></i> 部门</span>
                                <el-button @click="deleteDept(detailDept)" icon="delete" style="float: right; padding: 3px 0px 0px 3px" type="text"></el-button>
                                <el-button @click="handleEditDept(detailDept)" icon="edit" style="float: right; padding: 3px 10px 0px 3px" type="text"></el-button>
                                <el-button @click="handleAddDept" icon="plus" style="float: right; padding: 3px 0px 0px 3px" type="text"></el-button>
                            </div>
                            <el-tree :data="dataDept" node-key="id" ref="treeDept"
                                     v-loading="loadingDept"
                                     highlight-current
                                     :check-strictly="true"
                                     :default-expand-all="false"
                                     :default-expanded-keys="expandedKey_dept"
                                     :props="defaultProps"
                                     @node-click="handleDeptNodeClick"
                            ></el-tree>
                        </el-card>
                    </el-col>
                </el-row>
            </el-col>

            <!--用户列表-->
            <el-col :span="16">
                <div class="filter-container">
                    <el-form :model="listQuery" :inline="true" ref="filterForm" style="display: inline-block">
                        <el-form-item prop="account" class="filter-item">
                            <el-input v-model="listQuery.account" placeholder="账号" style="width: 150px;"></el-input>
                        </el-form-item>
                        <el-form-item prop="realName" class="filter-item">
                            <el-input v-model="listQuery.realName" placeholder="姓名" style="width: 150px;"></el-input>
                        </el-form-item>
                        <el-form-item prop="sex" class="filter-item">
                            <el-select v-model="listQuery.sex" placeholder="性别" clearable style="width: 100px">
                                <el-option
                                        v-for="item in sexOptions"
                                        :key="item.key"
                                        :label="item.label"
                                        :value="item.key">
                                </el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item prop="status" class="filter-item">
                            <el-select v-model="listQuery.status" placeholder="状态" style="width: 100px">
                                <el-option
                                        v-for="item in statusOptions"
                                        :key="item.key"
                                        :label="item.label"
                                        :value="item.key">
                                </el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item prop="orderBy" class="filter-item">
                            <el-select v-model="listQuery.orderBy" placeholder="排序" style="width: 150px">
                                <el-option
                                        v-for="item in sortOptions"
                                        :key="item.key"
                                        :label="item.label"
                                        :value="item.key">
                                </el-option>
                            </el-select>
                        </el-form-item>
                        <el-button class="filter-item" type="primary" icon="search" @click="handleFilter">搜索</el-button>
                        <el-button class="filter-item" type="primary" icon="mars-reset" @click="handleResetFilter">重置</el-button>
                        <el-button class="filter-item" type="primary" icon="delete2" @click="handleBatchRemoveUser">移除用户</el-button>
                    </el-form>
                </div>

                <el-table :data="list"
                          v-loading="listLoading"
                          element-loading-text="给我一点时间"
                          border
                          fit
                          highlight-current-row
                          @selection-change="handleSelectionChange"
                          style="width: 100%">

                    <el-table-column
                            type="selection"
                            width="55">
                    </el-table-column>

                    <el-table-column label="ID" width="65" align="center">
                        <template slot-scope="scope"> {{scope.row.id}} </template>
                    </el-table-column>

                    <el-table-column label="姓名" width="110px" align="center">
                        <template slot-scope="scope"> {{scope.row.realName}} </template>
                    </el-table-column>

                    <el-table-column label="性别" width="80px" align="center">
                        <template slot-scope="scope"> {{scope.row.sex | sexFilter}} </template>
                    </el-table-column>

                    <el-table-column label="账号" width="110px" align="center">
                        <template slot-scope="scope"> {{scope.row.account}} </template>
                    </el-table-column>

                    <el-table-column label="手机号码" width="130px" align="center">
                        <template slot-scope="scope"> {{scope.row.mobile}} </template>
                    </el-table-column>

                    <el-table-column label="邮件地址" min-width="200px" align="center" show-overflow-tooltip>
                        <template slot-scope="scope"> {{scope.row.email}} </template>
                    </el-table-column>

                    <el-table-column label="状态" align="center">
                        <template slot-scope="scope">
                            <el-tag :type="scope.row.status | statusTagFilter">{{scope.row.status | statusFilter}}</el-tag>
                        </template>
                    </el-table-column>
                </el-table>

                <div v-show="!listLoading" class="pagination-container">
                    <el-pagination
                            @size-change="handleSizeChange"
                            @current-change="handleCurrentChange"
                            :current-page="listQuery.page"
                            :page-sizes="[10, 20, 30, 50]"
                            :page-size="listQuery.rows"
                            layout="total, sizes, prev, pager, next, jumper"
                            :total="total">
                    </el-pagination>
                </div>

            </el-col>
        </el-row>

        <!--公司-->
        <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogCompanyFormVisible" size="small" @close="handleCloseDialogCompany">
            <el-row>
                <el-col :span="8">
                    <el-tree :data="dataCompany" node-key="id"
                             v-loading="loadingCompany"
                             highlight-current
                             :check-strictly="true"
                             :default-expand-all="false"
                             :default-expanded-keys="expandedKeyDialog"
                             :props="defaultProps"
                             @node-click="handleSetCompanyParent"
                    ></el-tree>
                </el-col>

                <el-col :span="16">
                    <el-form :model="formCompany" :rules="rulesCompany" ref="formCompany" labelPosition="right" labelWidth="80px" style="width: 400px">
                        <el-form-item label="所属上级" >
                            <el-input v-model="formCompany.parentName" placeholder="请选择所属上级" readonly icon="close" :on-icon-click="handleCompanyIconClick"></el-input>
                        </el-form-item>
                        <el-form-item label="名称" prop="name">
                            <el-input v-model="formCompany.name"></el-input>
                        </el-form-item>
                        <el-form-item label="编码" prop="code">
                            <el-input v-model="formCompany.code"></el-input>
                        </el-form-item>
                        <el-form-item label="备注">
                            <el-input
                                    type="textarea"
                                    :autosize="{ minRows: 2, maxRows: 4}"
                                    placeholder="请输入内容"
                                    v-model="formCompany.remarks">
                            </el-input>
                        </el-form-item>
                    </el-form>
                </el-col>
            </el-row>

            <div slot="footer" class="dialog-footer">
                <el-button @click="dialogCompanyFormVisible = false">取 消</el-button>
                <el-button v-if="dialogStatus == 'create'" type="primary" @click="createCompany">确 定</el-button>
                <el-button v-else="" type="primary" @click="updateCompany">确 定</el-button>
            </div>
        </el-dialog>

        <!--部门-->
        <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogDeptFormVisible" size="small" @close="handleCloseDialogDept">
            <el-row>
                <el-col :span="8">
                    <el-tree :data="dataDept" node-key="id"
                             v-loading="loadingDept"
                             highlight-current
                             :check-strictly="true"
                             :default-expand-all="false"
                             :default-expanded-keys="expandedKeyDialog"
                             :props="defaultProps"
                             @node-click="handleSetDeptParent"
                    ></el-tree>
                </el-col>
                <el-col :span="16">
                    <el-form :model="formDept" :rules="rulesDept" ref="formDept" labelPosition="right" labelWidth="80px" style="width: 400px">
                        <el-form-item label="所属公司" >
                            <el-input v-model="formDept.companyName" readonly></el-input>
                        </el-form-item>
                        <el-form-item label="所属上级" >
                            <el-input v-model="formDept.parentName" placeholder="请选择所属上级" readonly icon="close" :on-icon-click="handleDeptIconClick"></el-input>
                        </el-form-item>
                        <el-form-item label="名称" prop="name">
                            <el-input v-model="formDept.name"></el-input>
                        </el-form-item>
                        <el-form-item label="编码" prop="code">
                            <el-input v-model="formDept.code"></el-input>
                        </el-form-item>
                        <el-form-item label="备注">
                            <el-input
                                    type="textarea"
                                    :autosize="{ minRows: 2, maxRows: 4}"
                                    placeholder="请输入内容"
                                    v-model="formDept.remarks">
                            </el-input>
                        </el-form-item>
                    </el-form>
                </el-col>
            </el-row>
            <div slot="footer" class="dialog-footer">
                <el-button @click="dialogDeptFormVisible = false">取 消</el-button>
                <el-button v-if="dialogStatus == 'create'" type="primary" @click="createDept">确 定</el-button>
                <el-button v-else="" type="primary" @click="updateDept">确 定</el-button>
            </div>
        </el-dialog>
    </div>
</template>

<script>
    import {
        created as createdCompany,
        updated as updatedCompany,
        deleted as deletedCompany,
        fetchObject as fetchCompany,
        fetchTree as fetchCompanyTree } from '@/api/upms/company'
    import {
        created as createdDept,
        updated as updatedDept,
        deleted as deletedDept,
        fetchObject as fetchDept,
        fetchTree as fetchDeptTree,
        removeDepartmentAssignUser } from '@/api/upms/dept'
    import { fetchList as fetchUserList } from '@/api/upms/user'

    const sexOptions = [{label: '男', key: 1}, {label: '女', key: 2}, {label: '未知', key: 3}]
    const sortOptions = [{label: '按ID升序', key: 'id asc'}, {label: '按ID降序', key: 'id desc'}]
    const statusOptions = [{label: '正常', key: 1}, {label: '锁定', key: 2}]

    export default {
        name: 'organization',
        data() {
            return {
                dataCompany: [],
                loadingCompany: false,
                dataDept: [],
                loadingDept: false,
                defaultProps: {
                    label: 'name',
                    children: 'children'
                },
                textMap: {
                    update: '编辑',
                    create: '创建'
                },
                dialogCompanyFormVisible: false,
                dialogDeptFormVisible: false,
                dialogStatus: '',
                formCompany: {
                    id: '',
                    pid: '',
                    name: '',
                    code: '',
                    remarks: '',
                    parentName: ''
                },
                detailCompany: {
                    id: '',
                    pid: '',
                    name: '',
                    code: '',
                    remarks: '',
                    parentName: ''
                },
                rulesCompany: {

                },
                formDept: {
                    id: '',
                    pid: '',
                    name: '',
                    code: '',
                    remarks: '',
                    parentName: '',
                    companyId: '',
                    companyName: ''
                },
                detailDept: {
                    id: '',
                    pid: '',
                    name: '',
                    code: '',
                    remarks: '',
                    parentName: '',
                    companyId: '',
                    companyName: ''
                },
                rulesDept: {

                },
                expandedKey_company: [1],
                expandedKey_dept: [1],
                expandedKeyDialog: [1],

                list: null,
                total: null,
                listLoading: false,
                multipleSelection: [],
                listQuery: {
                    page: 1,
                    rows: 10,
                    account: undefined,
                    realName: undefined,
                    status: undefined,
                    sex: undefined,
                    orderBy: 'id asc'
                },
                sexOptions,
                statusOptions,
                sortOptions,
            }
        },
        created() {
            this.getDataCompany()
        },
        filters: {
            sexFilter(sex) {
                const sexArray = ['男', '女', '未知']
                return sexArray[sex?--sex:'']
            },
            statusFilter(status) {
                const statusArray = ['正常', '锁定']
                return statusArray[status?--status:'']
            },
            statusTagFilter(status) {
                const statusArray = ['success', 'danger']
                return statusArray[status?--status:'']
            }
        },
        methods: {
            handleSelectionChange(val) {
                this.multipleSelection = val;
            },
            handleSizeChange(val) {
                this.listQuery.rows = val
                this.getList()
            },
            handleCurrentChange(val) {
                this.listQuery.page = val
                this.getList()
            },
            handleFilter() {
                this.listQuery.page = 1
                this.getList()
            },
            handleResetFilter() {
                this.$refs.filterForm.resetFields()
                this.getList()
            },
            getList() {
                this.listLoading = true
                fetchUserList(this.listQuery).then(response => {
                    this.list = response.data.list
                    this.total = response.data.total
                    this.listLoading = false
                }).catch((error)=>{
                    console.log(error)
                    this.listLoading = false
                })
            },
            handleBatchRemoveUser() {

                if(this.multipleSelection.length > 0) {
                   var ids = [] ;
                   for(let item of this.multipleSelection) {
                       ids.push(item.userCompanyDeptAssignId)
                   }
                   this.$confirm('确定要删除？', '提示', {
                        confirmButtonText: '确定',
                        cancelButtonText: '取消',
                        type: 'warning'
                   }).then(() => {
                        removeDepartmentAssignUser({ids: ids.join(',')}).then(response => {
                            if(response.data.status) {
                                this.$notify({
                                    title: '成功', message: response.data.message,
                                    type: 'success', duration: 2000
                                })
                                this.getList()
                            } else {
                                this.$notify({
                                    title: '发生错误', message: response.data.message,
                                    type: 'error', duration: 2000
                                })
                            }
                        })
                    }).catch(() => {
                        this.$message({ type: 'info', message: '已取消删除' })
                    })
                } else {
                    this.$notify({
                        title: '提示', message: '请选择需要移除的用户',
                        type: 'warning', duration: 2000
                    })
                }
            },
            handleCompanyNodeClick(data, node) {
                this.detailCompany = data
                this.detailCompany['parentName'] = node.parent.data.name

                this.formDept.companyId = data.id
                this.formDept.companyName = data.name
                this.formDept.companyId = data.id
                this.formDept.companyName = data.name

                this.getDataDept(data.id)

                this.listQuery.companyId = data.id
                this.listQuery.departmentId = null
                this.getList()
            },
            handleDeptNodeClick(data, node) {
                this.detailDept = data
                this.detailDept['parentName'] = node.parent.data.name

                this.listQuery.departmentId = data.id
                this.getList()
            },
            handleCloseDialogCompany() {
                this.resetFormCompany()
            },
            handleCloseDialogDept() {
                this.resetFormDept()
            },
            handleAddCompany() {
                this.dialogCompanyFormVisible = true
                this.dialogStatus = 'create'
            },
            handleEditCompany(data) {
                if(data.id) {
                    this.dialogCompanyFormVisible = true
                    this.dialogStatus = 'update'
                    fetchCompany(data.id).then(response => {
                        this.dialogFormVisible = true
                        this.formCompany = Object.assign({}, response.data)
                        this.formCompany['parentName'] = data.parentName
                        this.expandedKeyDialog = [data.id]
                    })
                } else {
                    this.$notify({
                        title: '提示', message: '请选择需要编辑的公司',
                        type: 'warning', duration: 2000
                    })
                }
            },
            createCompany() {
                this.$refs['formCompany'].validate((valid) => {
                    if(valid) {
                        createdCompany(this.formCompany).then(response => {
                            if(response.data.status) {
                                this.$notify({
                                    title: '成功', message: response.data.message,
                                    type: 'success', duration: 2000
                                })
                                this.getDataCompany()
                            } else {
                                this.$notify({
                                    title: '操作失败', message: response.data.message,
                                    type: 'error', duration: 2000
                                })
                            }
                            this.dialogCompanyFormVisible = false
                            this.expandedKey_company = [this.formCompany.pid]
                        })
                    }
                })
            },
            updateCompany() {
                this.$refs['formCompany'].validate((valid) => {
                    if(valid) {
                        updatedCompany(this.formCompany).then(response => {
                            if(response.data.status) {
                                this.$notify({
                                    title: '成功', message: response.data.message,
                                    type: 'success', duration: 2000
                                })
                                this.getDataCompany()
                            } else {
                                this.$notify({
                                    title: '操作失败', message: response.data.message,
                                    type: 'error', duration: 2000
                                })
                            }
                            this.dialogCompanyFormVisible = false
                            this.expandedKey_company = [this.formCompany.pid]
                        })
                    }
                })
            },
            deleteCompany(data) {
                if(data.id) {
                    this.$confirm('确定要删除？', '提示', {
                        confirmButtonText: '确定',
                        cancelButtonText: '取消',
                        type: 'warning'
                    }).then(() => {
                        deletedCompany(data.id).then(response => {
                            if(response.data.status) {
                                this.$notify({
                                    title: '成功', message: response.data.message,
                                    type: 'success', duration: 2000
                                })
                                this.detailCompany = {}
                                this.getDataCompany()
                                this.expandedKey_company = [data.pid]
                            } else {
                                this.$notify({
                                    title: '发生错误', message: response.data.message,
                                    type: 'error', duration: 2000
                                })
                            }
                        })
                    }).catch(() => {
                        this.$message({ type: 'info', message: '已取消删除' })
                    })
                } else {
                    this.$notify({
                        title: '提示', message: '请选择需要编辑的公司',
                        type: 'warning', duration: 2000
                    })
                }
            },
            getDataCompany() {
                this.loadingCompany = true
                fetchCompanyTree().then(response => {
                    this.dataCompany = response.data
                    this.loadingCompany = false
                }).catch((error)=>{
                    console.log(error)
                    this.loadingCompany = false
                })
            },
            handleAddDept() {
                if(this.formDept.companyId) {
                    this.dialogDeptFormVisible = true
                    this.dialogStatus = 'create'
                } else {
                    this.$notify({
                        title: '提示', message: '请选择公司',
                        type: 'warning', duration: 2000
                    })
                }
            },
            handleEditDept(data) {
                if(data.id) {
                    this.dialogDeptFormVisible = true
                    this.dialogStatus = 'update'
                    fetchDept(data.id).then(response => {
                        this.dialogFormVisible = true
                        this.formDept = Object.assign({}, response.data, {companyId: this.formDept.companyId, companyName: this.formDept.companyName})
                        this.formDept['parentName'] = data.parentName
                        this.expandedKeyDialog = [data.id]
                    })
                } else {
                    this.$notify({
                        title: '提示', message: '请选择需要编辑的公司',
                        type: 'warning', duration: 2000
                    })
                }
            },
            createDept() {
                this.$refs['formDept'].validate((valid) => {
                    if(valid) {
                        createdDept(this.formDept).then(response => {
                            if(response.data.status) {
                                this.$notify({
                                    title: '成功', message: response.data.message,
                                    type: 'success', duration: 2000
                                })
                                this.getDataDept()
                            } else {
                                this.$notify({
                                    title: '操作失败', message: response.data.message,
                                    type: 'error', duration: 2000
                                })
                            }
                            this.dialogDeptFormVisible = false
                            this.expandedKey_dept = [this.formDept.pid]
                        })
                    }
                })
            },
            updateDept() {
                this.$refs['formDept'].validate((valid) => {
                    if(valid) {
                        updatedDept(this.formDept).then(response => {
                            if(response.data.status) {
                                this.$notify({
                                    title: '成功', message: response.data.message,
                                    type: 'success', duration: 2000
                                })
                                this.getDataDept()
                            } else {
                                this.$notify({
                                    title: '操作失败', message: response.data.message,
                                    type: 'error', duration: 2000
                                })
                            }
                            this.dialogDeptFormVisible = false
                            this.expandedKey_dept = [this.formDept.pid]
                        })
                    }
                })
            },
            deleteDept(data) {
                if(data.id) {
                    this.$confirm('确定要删除？', '提示', {
                        confirmButtonText: '确定',
                        cancelButtonText: '取消',
                        type: 'warning'
                    }).then(() => {
                        deletedDept(data.id).then(response => {
                            if(response.data.status) {
                                this.$notify({
                                    title: '成功', message: response.data.message,
                                    type: 'success', duration: 2000
                                })
                                this.detailDept = {}
                                this.getDataDept()
                                this.expandedKey_dept = [data.pid]
                            } else {
                                this.$notify({
                                    title: '发生错误', message: response.data.message,
                                    type: 'error', duration: 2000
                                })
                            }
                        })
                    }).catch(() => {
                        this.$message({ type: 'info', message: '已取消删除' })
                    })
                } else {
                    this.$notify({
                        title: '提示', message: '请选择需要编辑的部门',
                        type: 'warning', duration: 2000
                    })
                }
            },
            getDataDept() {
                this.loadingDept = true
                fetchDeptTree({companyId: this.formDept.companyId}).then(response => {
                    this.dataDept = response.data
                    this.loadingDept = false
                }).catch((error)=>{
                    console.log(error)
                    this.loadingDept = false
                })
            },


            handleCompanyIconClick() {
                this.formCompany = Object.assign({}, this.formCompany)
                this.formCompany['pid'] = ''
                this.formCompany['parentName'] = ''
            },
            handleSetCompanyParent(data, node) {
                var shut = false
                var sf = this.formCompany
                //判断是否选择自己作为上级
                if(this.formCompany.id == data.id) {
                    this.$message({
                        title: '提示', message: '选择所属上级有误',
                        type: 'info', duration: 2000
                    })
                    return
                }
                //判断选择的上级是否当前修改的上级
                res(node)
                function res(node) {
                    if(!shut) {
                        var n = node.parent
                        if(null != n) {
                            if(sf.id == n.data.id || sf.id == n.data.pid) {
                                shut = true
                            }
                            res(n)
                        }
                    }
                }
                if(shut == true) {
                    this.$message({
                        title: '提示', message: '选择所属上级有误',
                        type: 'info', duration: 2000
                    })
                    return
                }

                this.formCompany = Object.assign({}, this.formCompany)
                this.formCompany['pid'] = data.id
                this.formCompany['parentName'] = data.name
            },
            resetFormCompany() {
                this.$refs['formCompany'].resetFields()
                this.formCompany = {
                    id: '',
                    pid: '',
                    name: '',
                    code: '',
                    remarks: '',
                    parentName: ''
                }
                this.detailCompany = {
                    id: '',
                    pid: '',
                    name: '',
                    code: '',
                    remarks: '',
                    parentName: ''
                }
            },

            handleDeptIconClick() {
                this.formDept = Object.assign({}, this.formDept)
                this.formDept['pid'] = ''
                this.formDept['parentName'] = ''
            },
            handleSetDeptParent(data, node) {
                var shut = false
                var sf = this.formDept
                //判断是否选择自己作为上级
                if(this.formDept.id == data.id) {
                    this.$message({
                        title: '提示', message: '选择所属上级有误',
                        type: 'info', duration: 2000
                    })
                    return
                }
                //判断选择的上级是否当前修改的上级
                res(node)
                function res(node) {
                    if(!shut) {
                        var n = node.parent
                        if(null != n) {
                            if(sf.id == n.data.id || sf.id == n.data.pid) {
                                shut = true
                            }
                            res(n)
                        }
                    }
                }
                if(shut == true) {
                    this.$message({
                        title: '提示', message: '选择所属上级有误',
                        type: 'info', duration: 2000
                    })
                    return
                }

                this.formDept = Object.assign({}, this.formDept)
                this.formDept['pid'] = data.id
                this.formDept['parentName'] = data.name
            },
            resetFormDept() {
                this.$refs['formDept'].resetFields()
                this.formDept = {
                    id: '',
                    pid: '',
                    name: '',
                    code: '',
                    remarks: '',
                    parentName: '',
                    companyId: this.formDept.companyId,
                    companyName: this.formDept.companyName
                }
                this.detailDept = {
                    id: '',
                    pid: '',
                    name: '',
                    code: '',
                    remarks: '',
                    parentName: '',
                    companyId: this.formDept.companyId,
                    companyName: this.formDept.companyName
                }
            }
        }
    }
</script>

<!-- 局部样式 -->
<style rel="stylesheet/scss" lang="scss" scoped>
    .card-header{
        border-bottom: 1px solid #d1dbe5; padding: 15px 20px 15px 7px;
    }
    .el-card__body{
        .el-tree{
            border: 0px;
        }
    }
</style>